package fnord.illuminati;

import java.io.Serializable;
import java.util.*;

import fnord.illuminati.card.GroupCard;

public class Field implements Serializable {
	private static final long serialVersionUID = -1429725618666238284L;
	
	private Set<GroupCard> _cards;
	
	public Field() {
		_cards = new HashSet<GroupCard>();
	}
	
	public void add(GroupCard c) {
		_cards.add(c);
	}
	
	public boolean remove(GroupCard c) {
		return _cards.remove(c);
	}
	
	public boolean contains(GroupCard c) {
		return _cards.contains(c);
	}
	
	public GroupCard[] getAll() {
//		System.out.println(_cards.toArray());
		return (GroupCard[])_cards.toArray();
	}

	public Iterator<GroupCard> iterator() {
		return _cards.iterator();
	}
	
	public int size() {
		return _cards.size();
	}
}
